package server.xml;

import java.util.HashMap;
import java.util.Map;

public class ServletDef {
    private String servletName = null;
    private String servletClass = null;
    private Map<String, String> initParams = new HashMap<>();

    public String getServletName() {
        return servletName;
    }

    public void setServletName(String servletName) {
        this.servletName = servletName;
    }

    public String getServletClass() {
        return servletClass;
    }

    public void setServletClass(String servletClass) {
        this.servletClass = servletClass;
    }

    public Map<String, String> getInitParams() {
        return initParams;
    }

    public void addInitParam(String name, String value) {
        initParams.put(name, value);
    }

    @Override
    public String toString() {
        return "ServletDef{" +
                "servletName='" + servletName + '\'' +
                ", servletClass='" + servletClass + '\'' +
                ", initParams=" + initParams +
                '}';
    }
}
